package com.woniu.airent.mapper;

import com.woniu.airent.dto.UserDto;
import com.woniu.airent.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDtoMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(UserDto record);

    User selectByPrimaryKey(Integer userId);

    List<UserDto> selectAll();

    int updateByPrimaryKey(User record);

    UserDto selectUserByUserName(String userName);

    UserDto selectUserByTel(String userTel);

    Integer insertUser(@Param("userName") String userName,@Param("userPwd") String userPwd, @Param("userTel") String userTel);

    List<UserDto> selectUserRolesByUserName(String userName);

    List<UserDto> selectAllUser(@Param("userName") String userName);

    Integer selectUserType(Integer userId);

    Integer updateUserType(Integer userId);

    Integer unseal(Integer userId);
}
